/* 
 * File:   eventDetectionTask.cpp
 * Author: agnesschaap
 * 
 * Created on 23 juni 2010, 12:23
 */

#include "EventDetectionTask.h"

/*
 * flag 0 = theSetButton DOWN
 * flag 1 = theSetButton UP
 * flag 2 = theModeButton DOWN
 * flag 3 = theModeButton UP
 */
  
EventDetectionTask::EventDetectionTask(): cTask("eventDetectionTask",0,100), eventDetectionFlagGroup(4) {
	
	std::cout << "CMON!";	
	
    theSetButton.setListener((ButtonListener)*this);
    theModeButton.setListener((ButtonListener)*this);

    if(theSetButton.buttonDown()) {
        eventDetectionFlagGroup.set(0);
        std::cout << "Flag 0 set";
        //cTask::debug("Flag 0 set");
    }

    if(theSetButton.buttonUp()) {
        eventDetectionFlagGroup.set(1);
        //cTask::debug("Flag 1 set");
    }

    if(theModeButton.buttonDown()) {
        eventDetectionFlagGroup.set(2);
        //cTask::debug("Flag 2 set");
    }

    if(theModeButton.buttonUp()) {
        eventDetectionFlagGroup.set(3);
        //cTask::debug("Flag 3 set");
    }
	std::cout << "lolz";
    //cTask::debug("Dit is een goed teken");
}

void EventDetectionTask::init() {

}

void EventDetectionTask::update() {

}

void EventDetectionTask::buttonUp(Button b) {

}

void EventDetectionTask::buttonDown(Button b) {

}

